Public Function eliminaSpazi(stringa As String) As String
Dim i As Integer
Dim pos As Variant
Dim lung As Integer

lung = Len(stringa)
pos = InStr(1, stringa, " ", vbTextCompare)
If IsNumeric(pos) And pos <> 0 Then
    stringa = Left(stringa, pos - 1) & eliminaSpazi(Right(stringa, lung - pos))
End If
eliminaSpazi = stringa
End Function
